#pragma once

#include<iostream>
#include<cstdio>
#include<string>
#include<functional>

//2.任务类型为函数
//using Task = std::function<void()>;

//1.任务类型为类对象
class Task   
{
public:
    Task(){ }
    
    Task(int a, int b)
    { 
        _a = a;
        _b = b;
    }

    void Excute()
    { 
        _result = _a + _b;
    }

    void ResultToString()
    {
        std::cout << std::to_string(_a) << "+" << std::to_string(_b) << "=" << std::to_string(_result) << std::endl;
    }

    void DebugToString()
    {
        std::cout << _a << "+" << _b << "=?" << std::endl;
    }

private:
    int _a;
    int _b;
    int _result;
};